package net.hubt.itc.util;

import java.util.List;

import net.hubt.itc.data.RssItems;
import net.hubt.itc.ui.NewsActivity;


import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;

public class ListListener implements OnItemClickListener {
	List<RssItems> listItems;
	Activity activity;
	public ListListener(List<RssItems> aListItems, Activity anActivity) {
		listItems = aListItems;
		activity  = anActivity;
	}
	@Override
	public void onItemClick(AdapterView<?> parent, View view, int pos, long id) {
		Intent intent = new Intent(view.getContext(), NewsActivity.class);
        Bundle bundle = new Bundle();
        bundle.putString("link",  listItems.get(pos).getLink());
        intent.putExtras(bundle);
        activity.startActivity(intent);
	}
	private void startActivity(Intent intent) {
		// TODO Auto-generated method stub
		
	}

}
